Skip to content

feat(brain): GF16/TF3 neuroanatomical modules for format selection#553

Merged
gHashTag merged 2 commits into
mainfrom
feat/386-gf16-tf3-neuroanatomy
Apr 30, 2026
Merged

feat(brain): GF16/TF3 neuroanatomical modules for format selection#553
gHashTag merged 2 commits into
mainfrom
feat/386-gf16-tf3-neuroanatomy

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Summary

Implements the neuroanatomical brain modules from #386 for GF16/TF3 format management.

New Files (4)

  • src/brain/angular_gyrus.zig — Format introspection, phi-distance table (GF16=95.1% golden), auto-select per layer
  • src/brain/fusiform_gyrus.zig — f32 <-> GF16/BF16 encoding/decoding
  • src/brain/orbitofrontal_value.zig — Adaptive format selection based on weight statistics
  • src/brain/weber_tuning.zig — Weber-Fechner logarithmic quantization, ternary encode with adaptive JND

Tests (14)

  • phi-distance GF16 closest to 1/phi
  • golden% > 90% for GF16
  • auto-select format by layer position
  • Weber quantize (positive/negative/zero)
  • Adaptive JND scales with magnitude
  • Ternary encode + sparsity stats
  • GF16/BF16 roundtrip

Existing implementations in repo

  • zig-pkg/golden_float-*/src/formats/golden_float16.zig (357 LOC) — GF16+TF3 structs
  • src/brain/intraparietal_sulcus.zig (615 LOC) — GF16/TF3 utilities
  • hardware/rtl-root/gf16_*.v — GF16 Verilog ALU (add, mul, MAC)
  • fpga/openxc7-synth/gf16_*.v — Synthesis + testbenches

Refs #386

…zig-hdc dep

Closes #515

- build_minimal.zig: use b.createModule + root_module (Zig 0.16 API)
- build.zig.zon: remove zig-hdc (invalid hash) and zodd deps
- build.zig.zon: bump version 0.15.2 → 0.16.0
- src/hslm/cli.zig: fix escaped newline literal
- angular_gyrus.zig: format introspection, phi-distance table,
  golden% comparison, auto-select format per layer
- fusiform_gyrus.zig: f32 <-> GF16/BF16 encoding/decoding
- orbitofrontal_value.zig: adaptive format selection based on
  weight statistics (std, range)
- weber_tuning.zig: Weber-Fechner logarithmic quantization,
  ternary encode with adaptive JND

All with unit tests. Implements brain module mapping from #386.

Refs #386
@gHashTag gHashTag merged commit 643adfb into main Apr 30, 2026
9 of 19 checks passed
@gHashTag gHashTag deleted the feat/386-gf16-tf3-neuroanatomy branch April 30, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant